package com.hspedu.spring;

import com.hspedu.spring.component.SmartAnimalable;
import com.hspedu.spring.component.SmartDog;
import com.hspedu.spring.ioc.HspApplicationContext;
import com.hspedu.spring.ioc.HspSpringConfig;

/**
 * @author xianYun
 * @version 1.0
 **/
public class AppMain {
    public static void main(String[] args) {
        HspApplicationContext ioc = new HspApplicationContext(HspSpringConfig.class);
        Object bean = ioc.getBean("monsterDao");
        Object bean1 = ioc.getBean("monsterDao");
        Object bean2 = ioc.getBean("monsterService");
        Object bean3 = ioc.getBean("monsterService");
        SmartAnimalable smartDog = (SmartAnimalable)ioc.getBean("smartDog");
        System.out.println("===============AppMain================");
        System.out.println(bean);
        System.out.println(bean1);
        System.out.println(bean2);
        System.out.println(bean3);
        smartDog.getSum(1,2);
        smartDog.getSub(1,2);
    }
}